package com.jason.bookworm.dao.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("db1_borrowrecord")
public class BorrowRecord {
    @TableId("br_id")
    Integer id;
    @TableField(value = "br_username", insertStrategy = FieldStrategy.NOT_EMPTY)
    String username;
    @TableField(value = "br_bookid", insertStrategy = FieldStrategy.NOT_EMPTY)
    Integer bookId;
    @TableField(value = "br_borrowtime", insertStrategy = FieldStrategy.NOT_EMPTY)
    @JSONField(format = "yyyy-MM-dd")
    Date borrowTime;
    @TableField(value = "br_returntime", insertStrategy = FieldStrategy.NOT_EMPTY)
    @JSONField(format = "yyyy-MM-dd")
    Date returnTime;
    @TableField("br_status")
    String status;
}
